﻿using GalaSoft.MvvmLight;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CastingWellEquipmentGUI.ViewModel.Modal.AlarmsHistory
{
    public class AlarmsHistoryModel : ObservableObject
    {
        /// <summary>
        /// 报警历史
        /// 报警时间
        /// </summary>
        private string _EventTime;
        public string EventTime
        {
            get { return _EventTime; }
            set
            {
                _EventTime = value;
                RaisePropertyChanged(() => EventTime);
            }
        }
        /// <summary>
        /// 报警历史
        /// 报警标签
        /// </summary>
        private string _Source;
        public string Source
        {
            get { return _Source; }
            set
            {
                _Source = value;
                RaisePropertyChanged(() => Source);
            }
        }
        /// <summary>
        /// 报警历史
        /// ConditionID
        /// </summary>
        private int _ConditionID;
        public int ConditionID
        {
            get { return _ConditionID; }
            set
            {
                _ConditionID = value;
                RaisePropertyChanged(() => ConditionID);
            }
        }
        /// <summary>
        /// 报警历史
        /// 报警内容
        /// </summary>
        private string _AlarmText;
        public string AlarmText
        {
            get { return _AlarmText; }
            set
            {
                _AlarmText = value;
                RaisePropertyChanged(() => AlarmText);
            }
        }
        /// <summary>
        /// 报警历史
        /// 报警值
        /// </summary>
        private string _AlarmValue;
        public string AlarmValue
        {
            get { return _AlarmValue; }
            set
            {
                _AlarmValue = value;
                RaisePropertyChanged(() => AlarmValue);
            }
        }
        /// <summary>
        /// 报警历史
        /// 报警等级
        /// </summary>
        private int _Severity;
        public string Severity
        {
            get {
                if (_Severity==1)
                {
                    return "一级报警";
                }
                else if (_Severity == 2)
                {
                    return "二级报警";
                }
                else if (_Severity == 3)
                {
                    return "三级报警";
                }
                else
                {
                    return "未标注报警等级";
                };
                
            }
            set
            {
                _Severity =Convert.ToInt32(value);
                RaisePropertyChanged(() => Severity);
            }
        }
        /// <summary>
        /// 报警历史
        /// 标签标记码
        /// </summary>
        private int _SubAlarmType;
        public int SubAlarmType
        {
            get { return _SubAlarmType; }
            set
            {
                _SubAlarmType = value;
                RaisePropertyChanged(() => SubAlarmType);
            }
        }
        /// <summary>
        /// 报警历史
        /// 报警解除关联ID
        /// </summary>
        private int _EventAssociationID;
        public int EventAssociationID
        {
            get { return _EventAssociationID; }
            set { _EventAssociationID = value; RaisePropertyChanged(() => EventAssociationID); }
        }
        /// <summary>
        /// 报警历史
        /// 报警/解除标记 0=解除 1= 报警
        /// </summary>
        private int _Active;
        public int Active
        {
            get { return _Active; }
            set { _Active = value; RaisePropertyChanged(() => Active); }
        }
        /// <summary>
        /// 报警历史
        /// 报警解除时间
        /// </summary>
        private string _RelieveTime;
        public string RelieveTime
        {
            get { return _RelieveTime; }
            set { _RelieveTime = value; RaisePropertyChanged(() => RelieveTime); }
        }
        /// <summary>
        /// 搜索条件
        /// 创建时间 开始 
        /// </summary>
        private string _MSC_DateCreated_Start;
        /// <summary>
        /// 报警历史
        /// 创建时间 开始 
        /// </summary>
        public string MSC_DateCreated_Start
        {
            get { return _MSC_DateCreated_Start; }
            set
            {
                _MSC_DateCreated_Start = value;
                RaisePropertyChanged(() => MSC_DateCreated_Start);
            }
        }

        /// <summary>
        /// 搜索条件 
        /// 创建时间 结束
        /// </summary>
        private string _MSC_DateCreated_End;
        /// <summary>
        /// 搜索条件
        /// 创建时间 结束
        /// </summary>
        public string MSC_DateCreated_End
        {
            get { return _MSC_DateCreated_End; }
            set
            {
                _MSC_DateCreated_End = value;
                RaisePropertyChanged(() => MSC_DateCreated_End);
            }
        }
        /// <summary>
        /// 显示序号
        /// </summary>
        private int _OrderNo;
        /// <summary>
        /// 显示序号
        /// </summary>
        public int OrderNo
        {
            get { return _OrderNo; }
            set
            {
                _OrderNo = value;
                RaisePropertyChanged(() => OrderNo);
            }
        }


    }
}
